[ASP.NET MVC] Ajax.BeginForm doesn't work asynchronously
Posted
by Tony
on Stack Overflow
See other posts from Stack Overflow
or by Tony
Published on 2010-03-29T18:54:23Z
Indexed on
2010/03/29
19:13 UTC
Read the original article
Hit count: 508
asp.net-mvc-ajax
|asp.net-mvc
Hi, I've read the article http://davidhayden.com/blog/dave/archive/2009/05/19/ASPNETMVCAjaxBeginForm.aspx and now I have small problem with that code:
<%using (Ajax.BeginForm("ChangeData", new AjaxOptions { UpdateTargetId = "myLabel" }))
{ %>
<input id="mbutton" type="submit" value="blabla" />
<%} %>
<label id="myLabel"></label>
then, in the MyBookController.cs is the code to be invoked asynchronous:
public ActionResult ChangeData()
{
return Content("OK");
}
but, it doesn't work asynchronously, the compiler doesn't go inside that method
© Stack Overflow or respective owner